package com.yq.interview.jvm.study;

import java.util.concurrent.TimeUnit;

/**
 * @ClassName HelloGC
 * @Description GC
 *  -XX:+UserParallelGC
 * @Author yaoqiang
 * @Date 2020/11/24 13:50
 * @Version 1.0
 *
 *
 */
public class HelloGC {
    public static void main(String[] args) {
        long totalMemory=Runtime.getRuntime().totalMemory();
        long maxMemory=Runtime.getRuntime().maxMemory();
        System.out.println(totalMemory/1024/1024);
        System.out.println(maxMemory/1024/1024);
        System.out.println("xxxxxxxx");
//byte[] bayte=new byte[20*1024*1024];
        try {
            TimeUnit.SECONDS.sleep(Integer.MAX_VALUE);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }
}
